home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 1.iso / toolbox / src / exampleCode / opengl / defrasterPort / README < prev   
Text File  |  1996-11-11  |  2KB  |  51 lines

  1.  
  2.              toolbox/src/exampleCode/opengl/defrasterPort README
  3.  
  4.           defrasterPort: OpenGL & X versions of IrisGL defrasterfont
  5.  
  6.  
  7. -------------------------------------------------------------------------------
  8.  
  9.                    Porting IRIS GL defrasterfont() to OpenGL
  10.  
  11. This directory contains example codes which will allow you to use the bitmaps
  12. defined for irisGL defrasterfont() in an openGL environment or X environment.
  13.  
  14. defrasterfont() is an IRIS GL call that lets you customize raster fonts.
  15. Typically, you customize raster fonts in order to define special marker symbols
  16. that you would use either for annotation or in user interfaces. After you
  17. define the font by using defrasterfont(), you render it using charstr().
  18.  
  19. glBitmap() is the OpenGL call for rendering bitmaps. Bitmap data is always
  20. stored in 8-bit chunks that are defined from left to right and from bottom to
  21. top.
  22.  
  23. The bitmap format that X uses differs slightly: Each byte of the bitmap data is
  24. divided into two 4-bit segments, left and right. The defX.c utility first
  25. reverses, then swaps the segments; for example, it converts 00011100 to
  26. 00111000.
  27.  
  28. If you are porting an IRIS GL application to OpenGL and you want to take
  29. advantage of your existing defrasterfont() bitmap data, use the following file
  30. and utilities:
  31.  
  32. def.h:   include file that contains bitmap data.
  33.  
  34. defi.c:  sample utility that shows how you use defrasterfont in IRIS GL.
  35.  
  36. defo.c:  converts and renders to OpenGL window -- use the
  37.          routine in this utility to render IRIS GL bitmap data in OpenGL.
  38.  
  39. defx.c:  converts and renders to X window -- use the
  40.          routine in this utility to render IRIS GL bitmap data in X.
  41.  
  42. Note: the bitmap defined in def.h is a smiley face with 4 corners, which shows
  43. a 33x33 glyph.
  44.  
  45. The test bitmaps are included in the .c files.
  46.  
  47.      Yusuf Attarwala December, 1994
  48.  
  49. -------------------------------------------------------------------------------
  50.  
  51.